package com.ambow.Entity;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

@Entity
@Table
public class StockReceive extends ID implements Serializable{
    private int amount;
    private String remark;
    private Date receiveDate;
    @ManyToOne
	@JoinColumn(name="textBook_id",referencedColumnName="id")
	private TextBook textBook;//教材
    @ManyToOne(targetEntity=Supplier.class)
    @JoinColumn(name="supplier_id",referencedColumnName="id")
    private Supplier supplier;
    @ManyToOne(targetEntity=Operator.class)
    @JoinColumn(name="operator_id",referencedColumnName="id")
    private Operator operator;
    @OneToMany(targetEntity=Payment.class,mappedBy="stockReceive")
    private List<Payment> payment;
    
	/**
	 * @return the payment
	 */
	public List<Payment> getPayment() {
		return payment;
	}
	/**
	 * @param payment the payment to set
	 */
	public void setPayment(List<Payment> payment) {
		this.payment = payment;
	}
	public int getAmount() {
		return amount;
	}
	public void setAmount(int amount) {
		this.amount = amount;
	}
	public String getRemark() {
		return remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
	public Date getReceiveDate() {
		return receiveDate;
	}
	public void setReceiveDate(Date receiveDate) {
		this.receiveDate = receiveDate;
	}
	public TextBook getTextBook() {
		return textBook;
	}
	public void setTextBook(TextBook textBook) {
		this.textBook = textBook;
	}
	public Supplier getSupplier() {
		return supplier;
	}
	public void setSupplier(Supplier supplier) {
		this.supplier = supplier;
	}
	public Operator getOperator() {
		return operator;
	}
	public void setOperator(Operator operator) {
		this.operator = operator;
	}
	
    
}
